#ifndef TRCHARTMAINAREA_H
#define TRCHARTMAINAREA_H

#include <QPoint>
#include <QWidget>
#include <QSplitter>
#include <QMoveEvent>
#include <QDockWidget>
#include "TrChartTypes.h"
#include "TrChartKline.h"
#include "TrChartSubIndicator.h"
#include "TrChartAxisX.h"

class TrChartMainArea : public QWidget
{
    Q_OBJECT
public:
    explicit TrChartMainArea(QWidget *parent = nullptr);
    void virtual paintEvent(QPaintEvent* event);
    void virtual mouseMoveEvent(QMouseEvent *event);
    void virtual mousePressEvent(QMouseEvent* event);
    void virtual mouseDoubleClickEvent(QMouseEvent* event);
    void virtual resizeEvent(QResizeEvent* event);
protected:
    int m_iChartWidth = 0;
    int m_iChartHeight = 0;

    void drawMouseCross();
private:
    QDockWidget     *m_pDockLine            =   nullptr;
    QSplitter       *m_pMainSplitter        =   nullptr;
    TrChartKline    *m_pChartKline          =   nullptr;
    TrChartAxisX    *m_pChartAxis           =   nullptr;


    QPoint          m_pMousePoint;
    bool            m_bShowMouseCross = false;

signals:

};

#endif // TRCHARTMAINAREA_H
